﻿using Sasa.QualityTools.CodeAnalysis.Core;
using Sasa.QualityTools.CodeAnalysis.Core.VisualStudio;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;

namespace Sasa.QualityTools.CodeAnalysis.Cli
{
    public class Project : IProject
    {
        public string TargetDir { get; private set; }

        public string AssemblyPath { get; private set; }

        public string ConfigurationPath { get; private set; }

        public IEnumerable<string> DependencyDirectories { get; private set; }

        public ISolution Solution { get; set; }


        public Project(string projectDir, string assemblyPath, params string[] dependencies)
        {
            ConfigurationPath = Path.Combine(projectDir, Constants.CodeAnalysisConfigurationDirName, Constants.CodeAnalysisConfigurationFileName);
            AssemblyPath = assemblyPath;
            TargetDir = Path.GetDirectoryName(assemblyPath);
            DependencyDirectories = dependencies.ToList();
        }


        #region Members that need not be implemented.

        [SuppressMessage("Microsoft.Design", "CA1065")]
        public string Name
        {
            get { throw new NotImplementedException(); }
        }

        [SuppressMessage("Microsoft.Design", "CA1065")]
        public string ProjectPath
        {
            get { throw new NotImplementedException(); }
        }

        public IEnumerable<string> ReferenceAssemblyPaths
        {
            get { throw new NotImplementedException(); }
        }

        [SuppressMessage("Microsoft.Design", "CA1065")]
        public bool IsSupportedCodeAnalysis
        {
            get { throw new NotImplementedException(); }
        }

        [SuppressMessage("Microsoft.Design", "CA1065")]
        public string NotSupportedReason
        {
            get { throw new NotImplementedException(); }
        }

        public IEnumerable<IProjectItem> Items
        {
            get { throw new NotImplementedException(); }
        }

        public bool Build()
        {
            throw new NotImplementedException();
        }

        public void Save()
        {
            throw new NotImplementedException();
        }

        public void AddFromFile(string path)
        {
            throw new NotImplementedException();
        }

        public IProjectItem AddFromDirectory(string path)
        {
            throw new NotImplementedException();
        }

        public string GetFilePathFromTypeName(string typeName)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
